package com.wu01.demo.controller;

import com.wu01.demo.Entity.Emp;
import com.wu01.demo.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EmpCtroller {

    @Autowired
    EmpService empService;

    @RequestMapping("/emp/{id}")
    public Emp getEmp(@PathVariable("id") String id){
        return empService.getEmp(id);
    }
}
